package com.blog.Bard.base.service;

import java.util.Map;

import com.blog.Bard.base.pojo.BardArticle;
import com.blog.Bard.base.pojo.Bardarticleandlabel;
import com.blog.Bard.base.pojo.User;
import com.blog.Bard.common.service.BaseService;
import com.blog.Bard.common.util.Pager;

public interface BardArticleService extends BaseService {
	
	/**
	 * 	根据id获取实体
	 * @param id
	 * @return
	 * @throws Exception
	 */
	BardArticle getOne(Integer id) throws Exception;
	
	/**
	 * 	保存
	 * @param t
	 * @param u
	 * @throws Exception
	 */
	void save(BardArticle t, User u) throws Exception;
	
	/**
	 * 	删除
	 * @param id
	 * @throws Exception
	 */
	void del(Integer id) throws Exception;
	
	
	/**
	 * 	分页
	 * @param params
	 * @return
	 * @throws Exception
	 */
	Pager pageList(Map<String, Object> params) throws Exception;
	
	/**
	 * 设置文章类型
	 * @param id
	 * @param articleType
	 * @throws Exception
	 */
	void saveType(Integer id, Integer articleType) throws Exception;
	
	/**
	 * 获取文章选中的类型
	 * @param id
	 * @return
	 * @throws Exception
	 */
	Map<String, Object> getArticleType(Integer id) throws Exception;
	
	/**
	 * 获取拼接的文章的标签id字符串，如：1,2,3
	 * @param id
	 * @return
	 * @throws Exception
	 */
	Map<String, Object> getArticleLabels(Integer id) throws Exception;
	
	/**
	 * 保存标签
	 * @param arr
	 * @throws Exception
	 */
	void saveBardarticleandlabel(Bardarticleandlabel[] arr) throws Exception;

}
